home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / DiskUtil / Crunch / XFH.lha / XFH / SRC / INCLUDE / DOSSUPPORT.H
C/C++ Source or Header  |  1991-07-26  |  723b  |  36 lines

  1. /* 'dossupport.h' - AmigaDOS support rutines. */
  2.  
  3. #ifndef EXEC_TYPES_H
  4. #include <exec/types.h>
  5. #endif
  6.  
  7. #ifndef LIBRARIES_DOS_H
  8. #include <libraries/dos.h>
  9. #endif
  10.  
  11.  
  12. /* Prototypes. */
  13.  
  14. /* Memory allocation. */
  15. void *dosalloc (long);
  16. void  dosfree  (void *);
  17.  
  18. /* dalloc(p) points pointer p to suitable sized allocated mem. */
  19. /* The value of p is returned. */
  20. #define dalloc(p) ( (p)=dosalloc( sizeof(*(p)) ) )
  21. #define dfree(p) dosfree( (p) )
  22.  
  23.  
  24. /* BCPL conversion. */
  25.  
  26. BSTR cstr2b(char *cstr, UBYTE *buf);
  27. char *bstr2c(BSTR bstr, UBYTE *buf);
  28. BSTR cstr2binplace(char *pp);
  29. char *bstr2cinplace(UBYTE *pp);
  30.  
  31. #define c2b(cptr) ( (ULONG)(cptr) >> 2 )
  32. #define b2c(bptr) ( (void *)( (ULONG)(bptr) << 2) )
  33.  
  34.  
  35. /* End of dossupport.h */
  36.